package ckw.database.resultPattern;

import java.util.ArrayList;
import java.util.Collections;

public class VotingCardResultPattern {
	private String name;
	private ArrayList<VotingSubcardOptionResultPattern> votingSubcardOptions = new ArrayList<>();
	
	public VotingCardResultPattern(String name) {
		super();
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ArrayList<VotingSubcardOptionResultPattern> getVotingSubcardOptions() {
		return votingSubcardOptions;
	}

	public void setVotingSubcardOptions(
			ArrayList<VotingSubcardOptionResultPattern> votingSubcardOptions) {
		this.votingSubcardOptions = votingSubcardOptions;
	}
	
	public ArrayList<VotingSubcardOptionResultPattern> getSortedVotingSubcardOptions() {
		ArrayList<VotingSubcardOptionResultPattern> votingSubcardOptions = getVotingSubcardOptions();
		Collections.sort(votingSubcardOptions, new VotingSubcardOptionResultPattern());
		return votingSubcardOptions;
	}
}